home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / keyb / cedwars2.zip / CED_BUGS.DOC < prev    next >
Text File  |  1988-09-13  |  2KB  |  56 lines

  1.  
  2.  
  3.  This file came off the Night Modulator BBS in San Jose, California. The 
  4. author is anonymous. I've never had any troubles with anything like it, so 
  5. I don't know how accurate this report is. Microsoft C 4.0+ and MASM 5.0+ both 
  6. have problems with the RAW mode in the CON driver (so does Turbo Pascal 4.0) 
  7. that work similar to what this guy's second report seems to do.
  8.  
  9.                                                         Dave Williams
  10.  
  11.  
  12. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  13.  
  14. The following describes two bugs I have encountered in CED V1.0D:
  15.  
  16.  
  17. 1.  Be careful not to press the backspace key when input and/or output 
  18. is redirected!  (The result will be a system crash!)
  19.  
  20. 2.  The second bug is a subtle one (all examples refer to Microsoft C 
  21. V3+):
  22.  
  23. a.  You're running a program that uses CED to read strings from the 
  24. keyboard.  (This is what happens with the "cgets" function.)
  25.  
  26. b.  Your program traps Control-Break (and Control-C) interrupts.  (This 
  27. is the purpose of the "signal" function.)
  28.  
  29. c.  Instead of the usual process of merely setting an interrupt flag and 
  30. returning to DOS, your Control-Break interrupt routine retains control
  31. and continues the execution of your program, a perfectly legal DOS
  32. procedure.  (Your program might use the "longjmp" function.)
  33.  
  34. d.  You press Control-Break (or Control-C) during the time that CED is 
  35. actually performing input.
  36.  
  37. Normally, your Control-Break interrupt routine would expect to find all 
  38. of its registers restored by DOS.  However, CED sets up its own 
  39. registers before calling DOS while it is building an input line, 
  40. including (unfortunately) the Stack Segment register.  As a result, you 
  41. must reload ALL registers before continuing.  (Of course, there's no 
  42. problem if you simply return to DOS, but then you have no way to abort 
  43. the CED operation!)
  44.  
  45. Unfortunately, many high-level languages assume that the Stack Segment
  46. register will be intact - and they make no attempt to restore it,
  47. regardless of the program memory model.  So if you continue execution
  48. instead of returning to DOS, the result will be a system crash.
  49.  
  50. (There IS a way to fixup the Stack Segment register in Microsoft C V3+,
  51. but it requires a VERY sophisticated assembly language routine.)
  52.  
  53.  
  54. NOTE:  These are unfortunate bugs in an otherwise excellent program -
  55. there ARE ways to avoid both problems!
  56.